import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require('path')

export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    },
  },
  build: {
    target: 'es2015',
    // minify: 'terser',
    manifest: false,
    sourcemap: false,
    outDir: 'build',
    assetsDir: 'static',
    minify: 'esbuild',
    // sourcemap: false,
    rollupOptions: {},
  },
  server: {
    host: '0.0.0.0',
    port: 5000,
    open: true,
    https: false,
    proxy: {
      '/kol': {
        target: 'http://172.20.61.77:5000',
        changeOrigin: true,
        ws: true,
        // rewrite: (path) => path.replace(/^/kol/, '')
      }
    }
  }
})


